// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_l.p_b;

import android.content.Context;
import com.nnee.p_pr.p_atom.cls_q;
import com.nnee.p_pr.p_atom.cls_u;
import java.text.SimpleDateFormat;
import java.util.*;

public class cls_a
{

    public cls_a()
    {
    }

    public static String a(int i, int j, int k, int l, int i1, int j1, String s)
    {
        return a(new Date(i + -1900, j + -1, k, l, i1, j1), s);
    }

    public static String a(Context context, int i, int j, int k, int l, int i1, int j1)
    {
        return a(new Date(i + -1900, j + -1, k, l, i1, j1), context.getString(0x7f0a01bc));
    }

    public static String a(Context context, cls_u u1)
    {
    	String s = null;
        if(u1.e() != null && u1.e().a() != null) {
        	Calendar calendar = Calendar.getInstance();
            int i = calendar.get(1);
            int j = calendar.get(2);
            int k = calendar.get(5);
            int l = calendar.get(11);
            int i1 = calendar.get(12);
            int j1 = calendar.get(13);
            s = null;
            Calendar calendar1 = Calendar.getInstance();
            calendar1.setTime(u1.e().a());
            if(calendar1.get(11) == 0 && calendar1.get(12) == 0 && calendar1.get(13) == 0)
            {
                if(calendar1.get(1) == 0 && calendar1.get(2) == 0 && calendar1.get(5) == 0)
                    s = context.getString(0x7f0a01be);
                else
                if(i == calendar1.get(1))
                {
                    if(j == calendar1.get(2))
                    {
                        if(k == calendar1.get(5))
                            s = context.getString(0x7f0a01be);
                        else
                        if(k + -1 == calendar1.get(5))
                            s = context.getString(0x7f0a01bf);
                        else
                            s = c(context, u1.e().a());
                    } else
                    {
                        s = c(context, u1.e().a());
                    }
                } else
                if(i >= calendar1.get(1))
                    s = d(context, u1.e().a());
            } else
            if(i == calendar1.get(1) && j == calendar1.get(2) && k == calendar1.get(5) && l == calendar1.get(11) && i1 == calendar1.get(12))
            {
                int l1 = Math.abs(j1 - calendar1.get(13));
                if(l1 == 0)
                {
                    s = context.getString(0x7f0a01b7);
                } else
                {
                    Object aobj1[] = new Object[1];
                    aobj1[0] = Integer.valueOf(l1);
                    s = context.getString(0x7f0a01b8, aobj1);
                }
            } else
            if(i == calendar1.get(1) && j == calendar1.get(2) && k == calendar1.get(5) && l == calendar1.get(11))
            {
                int k1 = Math.abs(i1 - calendar1.get(12));
                Object aobj[] = new Object[1];
                aobj[0] = Integer.valueOf(k1);
                s = context.getString(0x7f0a01b9, aobj);
            } else
            if(i == calendar1.get(1) && j == calendar1.get(2) && k == calendar1.get(5))
            {
                Math.abs(l - calendar1.get(11));
                s = a(context, u1.e().a());
            } else
            if(i == calendar1.get(1) && j == calendar1.get(2))
            {
                if(Math.abs(k - calendar1.get(5)) == 1)
                    s = b(context, u1.e().a());
                else
                    s = e(context, u1.e().a());
            } else
            if(i == calendar1.get(1))
            {
                Math.abs(j - calendar1.get(2));
                s = e(context, u1.e().a());
            } else
            if(i > calendar1.get(1))
            {
                Math.abs(i - calendar1.get(1));
                s = f(context, u1.e().a());
            }
        }else {
        	s = context.getString(0x7f0a01be);
        }

        return s;

    }

    public static String a(Context context, Date date)
    {
        return a(date, context.getString(0x7f0a01ba));
    }

    public static String a(Date date, String s)
    {
        String s1;
        if(date == null)
        {
            s1 = null;
        } else
        {
            SimpleDateFormat simpledateformat = new SimpleDateFormat(s);
            simpledateformat.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
            s1 = simpledateformat.format(date);
        }
        return s1;
    }

    public static String b(int i, int j, int k, int l, int i1, int j1, String s)
    {
        return a(new Date(i + -1900, j + -1, k, l, i1, j1), s);
    }

    public static String b(Context context, int i, int j, int k, int l, int i1, int j1)
    {
        return a(new Date(i + -1900, j + -1, k, l, i1, j1), context.getString(0x7f0a01bd));
    }

    public static String b(Context context, Date date)
    {
        return a(date, context.getString(0x7f0a01bb));
    }

    public static String c(int i, int j, int k, int l, int i1, int j1, String s)
    {
        return a(new Date(i + -1900, j + -1, k, l, i1, j1), s);
    }

    public static String c(Context context, Date date)
    {
        return a(date, context.getString(0x7f0a01c0));
    }

    public static String d(Context context, Date date)
    {
        return a(date, context.getString(0x7f0a01c1));
    }

    public static String e(Context context, Date date)
    {
        return a(date, context.getString(0x7f0a01bd));
    }

    public static String f(Context context, Date date)
    {
        return a(date, context.getString(0x7f0a01bc));
    }
}
